<?php decorate_with(false) ?>
<?
    /* @todo remove copypasting with snippetSuccess.json.php */
	switch ($snippetName){
		case "menu":
            // searching for "menu" widget in all placeHolders
            foreach ($widgetPositionsGrouped as $placeholderName => $widgetPositions){
                foreach ($widgetPositions as $widgetPosition){
                    $widgetName=$widgetPosition->getWidget()->getSlug();
                    if ($widgetName=="menu"){
                        $widget=$widgetPosition->getWidget();
                        break(2);
                    }
                }
            }

            if (!empty($widget)){
                include_partial(
                    "main/menu",
                    array(
                        "currentSection"   =>  $currentSection,
                        "currentTag"       =>  $currentTag,
                        "settings"         =>  $settings,
                        "templateSettings" =>  $templateSettings,
                        "widget"           =>  $widget,
                    )
                );
            }
			break;
	}